<template>
  <div>
    <!-- 头部 -->
    <header class="header">
      <span v-if="$route.meta.back" class="back" @click="$router.go(-1)"
        >返回</span
      >
      <div class="text">{{ $route.meta.title }}</div>
      <router-link to="/register" v-if="$route.meta.register" class="register"
        >注册</router-link
      >
    </header>

    <!--一级路由视图  -->
    <router-view class="con"></router-view>
  </div>
</template>

<script>
export default {};
</script>

<style scoped>
.con{
  padding-top: 0.6rem;
}
.header{
  width: 100vw;
  height: 0.6rem;
  background: #ff4400;
  position: fixed;
  left: 0;
  top: 0;
}
.back{
  position: absolute;
  left: 0.2rem;
  line-height: 0.6rem;
   color: #fff;
}
.text{
  width: 100%;
  line-height: 0.6rem;
  text-align: center;
   color: #fff;
}
.register{
   position: absolute;
  right: 0.2rem;
  line-height: 0.6rem;
   color: #fff;
  top: 0;
}
</style>
